// https://umijs.org/config/
import { defineConfig } from 'umi';
import defaultSettings from './defaultSettings';
import routes from './routes';
export default defineConfig({
  hash: true,
  antd: {},
  dva: {
    hmr: true,
  },
  history: {
    type: 'browser',
  },
  locale: {
    // default zh-CN
    default: 'zh-CN',
    antd: true,
    // default true, when it is true, will use `navigator.language` overwrite default
    baseNavigator: true,
  },
  dynamicImport: {
    loading: '@/components/PageLoading/index',
  },
  targets: {
    ie: 11,
  },
  // umi routes: https://umijs.org/docs/routing
  routes,
  scripts: [
    { src: '/wgwpc/ueditor/ueditor.config.js' }, // 使用 <%= PUBLIC_PATH %> 指向 publicPath
    { src: '/wgwpc/ueditor/ueditor.all.js' },
    { src: '/wgwpc/ueditor/lang/zh-cn/zh-cn.js' },
  ],
  define: {
    "process.env.APP_TYPE": process.env.APP_TYPE || '',
  },
  // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  theme: {
    'primary-color': defaultSettings.primaryColor,
  },
  title: false,
  ignoreMomentLocale: true,
  manifest: {
    basePath: '/',
  },
  base: '/wgwpc/',
  publicPath: '/wgwpc/',
  outputPath: 'wgwpc',
  exportStatic: {},
  esbuild: {},

});
